<?php
	class HomeController extends CustomControllerAction {
		
		public function init() {
			parent::init();
		}
	
		public function indexAction() {

			# set up left tabs	
			$left_tabs = array(
				'Media' => array('/media/' . $user),
				'Comments' => array('/comments/' . $user)
			);

			# set up right tabs
			$auth = Zend_Auth::getInstance();
			if ($auth->hasIdentity())
			{
				$selected = 'Home';
				$right_tabs = array(
					'Home' => array('/home'),
					'Control Panel' => array('/cpanel')
				);
			}
			else
			{
				$selected = 'Login';
				$right_tabs = array(
					'Login' => array('/login')
				);
			}
			
			$this->view->tabs = array('selected' => $selected, 'left_tabs' => $left_tabs, 'right_tabs' => $right_tabs);
		}
	}
